install.js ➔ install   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 6.28

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 3
nc 3
nop 2
dl 0
loc 12
ccs 2
cts 7
cp 0.2857
crap 6.28
rs 9.4285
c 2
b 0
f 0
1
import components from './components';
2
import store from './store/store';
3
import Vuex from 'Vuex';
4
5 16
export function install(Vue, options = {}) {
6
	for (var key in components) {
7 4
		if (components.hasOwnProperty(key)) {
8
			Vue.component(key, components[key]);
9
		}
10
	}
11
12
	let commentsStore = new Vuex.Store(store);
13
	commentsStore.commit('setConfig', options);
14
15
	Vue.prototype.$commentsStore = commentsStore;
16
}
17